<?php
/**
 * Created by PhpStorm.
 * User: silenceper
 * Date: 2016/10/19
 * Time: 上午11:45
 */

namespace common\entities\common;


use common\entities\ConfigEntity;

/**
 * This is the model class for table "myscrm_contract_project".
 *
 * @property string $id
 * @property string $orgcode
 * @property string $ProjId
 * @property string $ProjName
 * @property string $city
 * @property string $contractBeginOn
 * @property string $contractEndOn
 * @property integer $status
 * @property string $contractName
 * @property string $contractId
 * @property string $contractNum
 * @property string $contractCustomManager
 * @property string $contractCustomManagerPhone
 * @property string $contractCustomManagerEmail
 * @property string $contractDeliver
 * @property string $contractDeliverPhone
 * @property string $contractDeliverEmail
 * @property string $areaId
 * @property string $wxName
 * @property string $applicationCode
 * @property string $applicationName
 * @property integer $isOverdue
 * @property string $overdueTime
 * @property string $overdueReason
 * @property string $IsDisplay
 * @property string $Reason
 * @property string $sync_time
 */
class MyscrmContractProjectEntity extends ConfigEntity
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'myscrm_contract_project';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['contractBeginOn', 'contractEndOn', 'overdueTime', 'sync_time'], 'safe'],
            [['status', 'isOverdue'], 'integer'],
            [['id', 'ProjId', 'contractId', 'areaId'], 'string', 'max' => 36],
            [['orgcode'], 'string', 'max' => 45],
            [['ProjName', 'contractName', 'overdueReason', 'Reason'], 'string', 'max' => 500],
            [['city', 'contractNum', 'contractCustomManager', 'contractCustomManagerPhone', 'contractCustomManagerEmail', 'contractDeliver', 'contractDeliverPhone', 'contractDeliverEmail', 'wxName', 'applicationName'], 'string', 'max' => 120],
            [['applicationCode', 'IsDisplay'], 'string', 'max' => 60],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'orgcode' => 'Orgcode',
            'ProjId' => '项目ID',
            'ProjName' => '项目名称',
            'city' => '城市',
            'contractBeginOn' => '合同开始时间',
            'contractEndOn' => '合同结束时间',
            'status' => '状态',
            'contractName' => '合同名称',
            'contractId' => '合同授权表ID',
            'contractNum' => '合同号',
            'contractCustomManager' => 'Contract Custom Manager',
            'contractCustomManagerPhone' => 'Contract Custom Manager Phone',
            'contractCustomManagerEmail' => 'Contract Custom Manager Email',
            'contractDeliver' => 'Contract Deliver',
            'contractDeliverPhone' => 'Contract Deliver Phone',
            'contractDeliverEmail' => 'Contract Deliver Email',
            'areaId' => 'Area ID',
            'wxName' => 'Wx Name',
            'applicationCode' => 'Application Code',
            'applicationName' => 'Application Name',
            'isOverdue' => 'Is Overdue',
            'overdueTime' => 'Overdue Time',
            'overdueReason' => 'Overdue Reason',
            'IsDisplay' => 'Is Display',
            'Reason' => 'Reason',
            'sync_time' => '最近同步时间',
        ];
    }
}